package offer;

/**
 * <p>
 * 剑指 Offer 27. 二叉树的镜像
 * </p>
 *
 * @author xiaozuolin
 * @date 2021/9/23 16:09
 */
public class Offer27 {

    public TreeNode mirrorTree(TreeNode root) {
        if (root == null) {
            return null;
        }
        TreeNode tmp = root.left;
        root.left = mirrorTree(root.right);
        root.right = mirrorTree(tmp);
        return root;
    }
}
